1. Field of the Invention
The present invention relates to a method for generating polygons, based on a NURBS (non-uniform rational B-spline) model that is modeled on NURBS surfaces that represent parametric surfaces, and to an image display apparatus wherein that method is employed.
2. Description of the Related Art
FIG. 85 is a diagram that describes a general configuration example of a game apparatus that is a conventional image display apparatus wherein polygons are used. Under the control of a host processor 100, multiple polygons that configure an object displayed on a display device 400 are input to a geometry computation unit 200 in correspondence with the advance of a game program.
Polygon data input to the geometry computation unit 200 define polygons in three-dimensional local coordinates each having origin coordinates. The geometry computation unit 200 converts the polygon data defined on the local coordinates to a common world coordinate system for all objects.
Also, the polygon data is converted to three-dimensional viewing-point coordinates, which have the view point placed in this world coordinate system as the origin. The viewing point changes as the game program advances, wherefore the polygon viewing-point coordinates are updated in correspondence with these viewing-point changes.
Next, with the viewing point coordinates as the origin, the object is projected onto a screen corresponding to the screen of the display device 400 on which it is displayed, that is, the polygon data are converted to two-dimensional plane coordinates.
The polygon data converted to two-dimensional plane coordinates are next input to a renderer 300. The renderer 300, based on the polygon data, performs rendering processes such as adding texturing, lighting effects, and RGB color data.
Then the renderer 300 writes the output of its rendering processing to a video RAM, this is repeatedly read out and sent to the display device 400, whereby the object can be displayed.
In recent years, however, technology is being adopted that defines humans and other objects displayed in game apparatuses and the like by NURBS models modeled on NURBS (non-uniform rational B-spline) surfaces representing parametric surfaces generated by three-dimensional computer graphics (CG) modeling tools. These NURBS models constitute a technology well suited to defining objects having curved surfaces.
In other words, when an object is shaped with curved surfaces, the object data volume can be made less by defining the object with a NURBS model than by defining it by a set of polygons.
When technology that defines an object with a NURBS model, such as that described in the foregoing, is assumed, the NURBS model cannot be directly handled by a conventional game apparatus. Firstly, therefore, in the game development apparatus, NURBS models are converted to polygons by CG modeling tools, and these polygon data are stored in the memory of the game device.
At this time, the NURBS surface object will be converted into numerous polygons, so the data volume after conversion to polygons becomes very large. For this reason, a large-capacity memory is required to store those data.
It is possible here to reduce the number of polygons configuring one object, depending on the size of the object that is displayed on the screen. For example, the greater the distance becomes from the coordinate position of the viewing point, the smaller becomes the size of the object displayed on the screen, and the fewer may be the polygons that configure the object.
However, with technology which uses objects wherein NURBS surfaces have been divided into polygons beforehand in a game device such as that supposed above, the number of polygons configuring a displayed object is not changed, irrespective of the size thereof. For that reason, the same number of polygons must be processed for each object, irrespective of the display size thereof, and, even if one polygon is smaller than 1 pixel, polygon processing becomes necessary.
Furthermore, it is possible to subject NURBS surface objects to geometry computation processing, not at the polygon vertex data stage but at the NURBS surface control point stage. However, with game devices wherein NURBS surface objects are used, such as is supposed above, geometry computation processing is performed at the polygon vertex data stage, wherefore the processing load becomes heavy.
Furthermore, when NURBS surface objects are deformed, it is necessary for a large volume of polygon vertices to be controlled by the host processor, and for a large volume of polygon data to be transferred over a bus connecting the host processor and the geometry computation unit, wherefore a very high bus band is required.
Also, the more complex a NURBS model surface shape is, the greater increase there is in the volume of computations necessary to find one point (that is, one [set of] vertex coordinates for a polygon) on the NURBS model.
That being so, the more complex the surface shape of a NURBS model is, the more voluminous becomes the processing for converting from NURBS models to polygons, whereupon there arises a danger that the real-time processing ability required by the game apparatus may be impaired.
Now, even in cases where the NURBS model has a complex surface shape, as was mentioned earlier, if that model is positioned a far distance from the viewing point, and the size of the object displayed on the screen is small, that complex surface shape cannot be visually discerned by the player.
Accordingly, when the size of an object on the screen is small, there is no need to faithfully reproduce the shape thereof using a large quantity of polygons, and there will be no problem in simplifying to some degree the surface shape of the NURBS model. If the surface shape of a NURBS model is simplified, the number of polygons converted can be reduced, making it possible also to reduce the polygon data volume. The volume of computations for finding points on the NURBS model will also be diminished, wherefore the conversion process can be speeded up. Alternatively, instead of simplifying the curved surface shape of the NURBS model, it is possible merely to reduce the number of surface sampling points.
However, with a method for converting NURBS models to polygons (i.e. dividing a model into a plurality of polygons) and generating polygons in the game development apparatus supposed in the foregoing, the NURBS models are not simplified, no matter the size of the objects displayed, and, even when the size of a NURBS model of complex shape is small, the points on the NURBS model are computed, and division is made into polygons, for that surface shape as is.
For that reason, conventional game devices (image display devices) require high-capacity memories for storing very large volumes of polygon data, and the polygon data computation means (CPU, etc.) are subjected to heavy loads.
An object of the present invention, accordingly, is to provide an efficient polygon generation method in technology for converting NURBS surface objects to polygons, and an image display apparatus that uses that method.
Another object of the present invention is to provide a polygon generation method, in technology for converting NURBS surface objects to polygons, wherewith it is possible to reduce the memory capacity for storing post-conversion polygons, together with an image display apparatus that uses that method.
Yet another object of the present invention is to provide a polygon generation method, in technology for converting NURBS surface objects to polygons, wherewith it is possible to reduce the volume of polygon data and other data transferred between a polygon drawing processor (rendering processor) and a host processor, together with an image display apparatus that uses that method.
Still another object of the present invention is to provide a polygon generation method, in technology for converting NURBS surface objects to polygons, wherewith, by directly processing NURBS surface object data, both the volume of computations for converting from the NURBS surface objects to polygons and the load imposed on the processor that draws the polygons can be optimized, together with an image display apparatus that uses that method.
Yet another object of the present invention is to provide a polygon generation method, in technology for converting NURBS surface objects to polygons, wherewith, by directly processing NURBS surface object data, it is possible to optimize the degree of detail in the NURBS surface object according to the displayed size, together with an image display apparatus that uses that method.
Yet another object of the present invention is to provide a polygon generation method and an image display apparatus that uses that method, in technology for converting NURBS models to polygons and generating polygons, wherewith the polygon data volume can be reduced.
Yet another object of the present invention is to provide a polygon generation method and an image display apparatus that uses that method, in technology for converting NURBS models to polygons and generating polygons, wherewith the conversion processing volume can be reduced.
Still another object of the present invention is to provide a trimming curve processing method that maximally simplifies the computations for trimming when directly handling NURBS surface model data, together with a three-dimensional image processing system that uses that method.
Yet another object of the present invention is to provide a trimming curve processing method that makes it possible to draw trimmed NURBS surface models in real time, together with a three-dimensional image processing system that uses that method.
The polygon generation method and image display apparatus using that method which achieve the objects of the present invention noted in the foregoing, in terms of their basic features, coordinate-convert NURBS object data to coordinates having the viewing point at the origin, in conjunction with the advance of a program, determine the degree of detail wherewith objects are drawn on a display, find the number of polygon divisions when NURBS object data are converted to objects configured by polygons, in accordance with the determined degree of detail wherewith the objects are drawn, and compute vertices of the polygons converted to in accordance with that number of divisions. Rendering processing is also performed on the polygons configured by the vertices computed.
In the basic features noted above, in terms of a specific mode, polygons whereinxe2x80x94of the vertices computed as noted above, all of the vertices are dislocated from the display screen displayed on the display device noted earlierxe2x80x94are removed, and vertex attribute values are computed for the vertices of the remaining polygons.
Furthermore, in one mode, the outer products of two sides of polygons sharing the vertices computed as noted above are found, the fronts and backs of the polygons are determined from the direction of the outer products found and the direction of the viewing point, and the backward polygons are removed, after which vertex attribute values are computed for the vertices of the remaining polygons. (Polygons having front-and-back display attributes, however, are not removed.)
Furthermore, in one mode, a characteristic is that the degree of detail wherewith the objects noted above are drawn is determined according to the display surface area of the display device noted above and to the proportion of that display surface area occupied by the objects displayed.
Furthermore, in a different mode, the degree of detail wherewith the objects noted above are drawn is adjusted by the program, for each execution scene contained in the program, so that the rendering processing for the polygon data generated as noted above is not overloaded.
The trimming curve processing method that achieves the object of the present invention noted earlier, in terms of its basic configuration, generates a two-dimensional array having a size equivalent to the number of vertices in the u and v directions corresponding to a parametric curved surface displayed by a plurality of vertices in the u and v directions in parametric space. Then the trimming curves on the parametric surface noted above are converted to polygons by straight line segments on the two-dimensional array noted above. Then decisions are made as to whether to make vertices inside the polygons so converted to be valid or invalid.
Other objects and features of the present invention will be made clear from embodiment aspects of the invention described with reference to the following drawings.